package vworld.business.message;

import generated.business.message.MessageServicePOA;
import generated.domain.message.Message;

import org.omg.CORBA.ORB;

import vworld.ServerSingleton;

public class MessageServiceServant extends MessageServicePOA {
	private ORB orb;

	public void setOrb(ORB pOrb) {
		orb = pOrb;
	}

	public void leaveMessage(Message message) {
		ServerSingleton.getInstance().MESSAGE_DAO.createMessage(message);
	}

	public Message[] retreiveMessage(String avatarName) {
		return ServerSingleton.getInstance().MESSAGE_DAO
				.getMessages(avatarName);
	}

}
